﻿<Window x:Class="XmlEditor.Presentation.Views.SaveChangesWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:Properties="clr-namespace:XmlEditor.Presentation.Properties" 
        Title="{Binding Title}" MinWidth="370" MinHeight="250" SizeToContent="WidthAndHeight" ShowInTaskbar="False" 
    Icon="{DynamicResource WriterImageSource}">

    <Grid MinWidth="370"
          MinHeight="250"
          KeyboardNavigation.DirectionalNavigation="Cycle"
          FocusManager.FocusedElement="{Binding ElementName=yesButton}"
          Margin="0,0,11,11">
        <Grid.LayoutTransform>
            <ScaleTransform ScaleX="{Binding ZoomService.ActiveZoom}" ScaleY="{Binding ZoomService.ActiveZoom}"/>
        </Grid.LayoutTransform>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <Label Content="{x:Static Properties:Resources.SaveChangesTo}" Padding="0" Grid.ColumnSpan="4"/>

        <Border BorderBrush="#828790"
                BorderThickness="1"
                Grid.ColumnSpan="4"
                Grid.Row="1"
                Margin="11,11,0,11">
            <ScrollViewer Padding="4">
                <ItemsControl ItemsSource="{Binding Documents}"
                              IsTabStop="False"
                              DisplayMemberPath="FileName" />
            </ScrollViewer>
        </Border>

        <Button Command="{Binding YesCommand}"
                x:Name="yesButton"
                IsDefault="True" 
                TabIndex="1"
                IsTabStop="True"
                Content="{x:Static Properties:Resources.YesMenu}"
                Grid.Column="1"
                Grid.Row="2" />
        <Button Command="{Binding NoCommand}"
                Content="{x:Static Properties:Resources.NoMenu}"
                TabIndex="2"
                Grid.Column="2"
                Grid.Row="2" />
        <Button Command="{Binding CancelCommand}"
                Content="{x:Static Properties:Resources.CancelMenu}"
                TabIndex="3"
                Grid.Column="3"
                Grid.Row="2" />
    </Grid>
    
</Window>
